wyke.cc

Lost and Found - Recovering Photographs and Videos

TLDR: I found an open source way to recover photos and videos from my camera's SD card using Homebrew and photorec on my mac.

You know when that thought crosses your mind...I should probably...put that somewhere I will remember/move that pracariously placed glass of wine/back that up before I delete it etc. and you just ignore it and then, in the not too distant future, it just comes back to bite you...yeah that! I was just tidying stuff up, dusting off the camera ready to encourage myself to use it a bit more. The SD card was full, quick scan through and it's all stuff that Josh had taken on a holiday months earlier, that he had downloaded ages ago as far as I knew. As far as I was concerned I could just format tha card and I'm ready. The voice whispered shouldn't you just back them up first, you know, just in case. But the card was in the camera, and I don't have a card reader on the laptop at hand so the process of backing up was going to be painful and slow so I just convinced myself that by now Josh must have got all he wanted off the card. So I pressed format SD Card on the camera and popped the camera away.

Fast forward 2 weeks and Josh asks, did you download the photos and videos off the camera from Font? Mild panic, yes, no, didnt't you? Followed by a short check via the camera to confirm that yes I had deleted the entire contents of the SD cards. Actually Josh was ok with it, he had most of the photos he wanted but he didn't have the videos. The slightly guilty feeling was enough motivation to see if it was possible to get them back.

I had a vague recollection that formatting an SD card didn't delete data, just made it not visible and allowed it to be overwritten by new data. I haden't used the camera since I formatted the SD card (best laid plans and all that), so I figured it should be possible to recover the data. How hard could it be.

A bit of searching got me to a couple of blogs and posts that appeared helpful, which lead to some optomism. There seemed to be plenty of options out there for recovery, even a few that were free. Anyway I followed a few threads on Reddit and a couple of blogs and quickly found that most of the options were really just thinly veiled sales pitches aimed at enticing you with the promise of your lost pics so long as you were willing to pay. I didn't want to part with what appeared to be a minimum of £50 on the vague promise of getting my photos back. There must be a geeky way to do this I thought.

The problem with geeky is, well, it's geeky. It has its own language, there are loads of assumptions made of baseline knowledge and it feels really easy to get lost (and I'm worried I might break something). I have dabbled in the past with the simplest of coding and messed with Linux but I am not a command line user, terminal scares me and the fact that my tech just works is a benefit I value. And I am also keen to get a grip of my relationship with technology which seems to have unintentionally shifted to a passive consumer mode driven by addicitve algorithms (more of this another time). Anyway more dabbling is on the cards, so this seems like a good place to start.

The main reason for the post is so I can remember what I did and how it worked so I can do it again in the future if I need to. I eventually found a couple of blogs that were useful but they were initially quite well hidden in the swamp.

What worked

  • Install Homebrew.
  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Install testdisk (inc photorec)
  • brew install testdisk
  • Run photorec
  • sudo photorec
  • Follow the prompts